package com.example.barcodeapp.persenter.own;

import com.example.barcodeapp.base.BasePersenter;
import com.example.barcodeapp.common.CommonSubscriber;
import com.example.barcodeapp.interfaces.own.IOwn;
import com.example.barcodeapp.model.HttpManager;
import com.example.barcodeapp.ui.wode.bean.DingDanXiangQingBean;
import com.example.barcodeapp.utils.RxUtils;

public class DingDanXiangQingPresenter extends BasePersenter<IOwn.DingDanXiangQingView> implements IOwn.DingDanXiangQingPresenter {
    @Override
    public void getDingDanXiangQing(String dingdanhao) {
        addSubscribe(HttpManager.getInstance().getOwnTpApi().getDingDanXiangQing(dingdanhao)
                .compose(RxUtils.rxScheduler())
                .subscribeWith(new CommonSubscriber<DingDanXiangQingBean>(mView) {
                    @Override
                    public void onNext(DingDanXiangQingBean dingDanXiangQingBean) {
                        mView.getDingDanXiangQingBean(dingDanXiangQingBean);
                    }
                }));
    }
}
